@font-face {
  font-family: "BengaliMeitei";
  src: url("fonts/BengaliMeitei.woff2") format("woff2") tech('variations'),
    url("fonts/BengaliMeitei.woff") format("woff"),
    url("fonts/BengaliMeitei.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: fallback;
}

@font-face {
  font-family: "MeiteiMayek";
  src: url("fonts/MeiteiMayek.woff2") format("woff2") tech('variations'),
    url("fonts/MeiteiMayek.woff") format("woff"),
    url("fonts/MeiteiMayek.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: fallback;
}

html,
body {
  overflow-anchor: none;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  margin: 0;
  padding: 10px;
  min-height: 100vh;
  background-color: #f1f5f9;
  background-image:
    radial-gradient(circle at 50% -10%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 100% 25%, rgba(148, 163, 184, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 0% 75%, rgba(99, 102, 241, 0.06) 0%, transparent 45%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(241, 245, 249, 0.85) 100%),
    radial-gradient(#cbd5e1 1.2px, transparent 1.2px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 24px 24px;
  background-attachment: fixed;
  color: #0f172a;
}

.container {
  margin: 5px;
}

.row {
  display: flex;
  margin-bottom: 5px;
  padding: 5px;
  border: 1px solid #ccc;
}

.cell {
  padding: 5px;
  border: 1px solid #000;
  min-width: 100px;
  pointer-events: none;
  user-select: none;
}

.input-section {
  margin-bottom: 5px;
  padding: 5px;
}

.hidden {
  display: none !important;
}

/* Responsive visibility for PC and Mobile only elements */
@media (max-width: 768px) {
  .pc-only {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .mobile-only {
    display: none !important;
  }
}

.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.popup-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.popup-content button {
  margin-top: 10px;
  padding: 8px 15px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.popup-content button:hover {
  background-color: #0056b3;
}

.language-btn {
  pointer-events: none;
  opacity: 0.5;
}

.language-btn.active {
  pointer-events: auto;
  opacity: 1;
}

/* Left Panel Styles */
#left-panel {
  display: none;
  /* Hide by default on large screens */
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 200px;
  background: linear-gradient(180deg, #ce5611, #da9021, #a03a00);
  padding: 10px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(5px);
  transform: translateX(-100%);
  will-change: transform;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  contain: layout style paint;
}

#left-panel.active {
  transform: translateX(0px);
}

body.panel-active {
  margin-left: 0 !important;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#left-panel h3 {
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
  margin-bottom: 15px;
  font-size: 22px;
  text-align: center;
}

#left-panel .navbar {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

#left-panel .navbar li {
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#left-panel .navbar a {
  display: block;
  padding: 12px 15px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

#left-panel .navbar a:hover {
  background: rgba(255, 255, 255, 0.1);
  padding-left: 20px;
}

#menu-toggle {
  display: none;
  position: fixed;
  left: 10px;
  top: 8px;
  z-index: 1001;
  background: #883f15c2;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

/* ========================================================
   CRYSTAL CIRCULAR ORB - POP-UP MODAL OVERLAY
   ======================================================== */
.progress-bar-container {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(2, 8, 20, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999 !important;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  animation: orbOverlayFadeIn 0.3s ease-out forwards;
}

.progress-bar-container[style*="display: block"],
.progress-bar-container[style*="display: flex"] {
  display: flex !important;
}

@keyframes orbOverlayFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.crystal-orb-vessel {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 28%, rgba(12, 38, 70, 0.95) 0%, rgba(2, 10, 22, 0.98) 82%);
  border: 3.5px solid rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 50px rgba(2, 132, 199, 0.55),
    0 0 100px rgba(2, 132, 199, 0.3),
    inset 0 0 35px rgba(0, 0, 0, 0.9),
    inset 0 0 14px rgba(56, 189, 248, 0.25);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateZ(0);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
  margin: 0 auto;
  animation: orbPopIn 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes orbPopIn {
  0% {
    transform: scale(0.6) translateY(24px);
    opacity: 0;
  }

  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.orb-halo-glow {
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, rgba(2, 132, 199, 0.05) 55%, transparent 75%);
  pointer-events: none;
  z-index: 1;
}

.progress-bar,
.heavy-water-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100% !important;
  height: 0%;
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 35%, #03446a 75%, #082f49 100%);
  transition: height 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 10;
  overflow: visible;
}

/* Style 4: Rapid Power Undulation Wave Layers */
.rapid-sine-back {
  position: absolute;
  top: -48px;
  left: 0;
  width: 200%;
  height: 58px;
  display: flex;
  opacity: 0.7;
  animation: orbSineBack 2.8s linear infinite;
}

.rapid-sine-front {
  position: absolute;
  top: -38px;
  left: 0;
  width: 200%;
  height: 50px;
  display: flex;
  opacity: 0.98;
  animation: orbSineFront 1.5s linear infinite;
}

@keyframes orbSineFront {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes orbSineBack {
  from {
    transform: translateX(-50%);
  }

  to {
    transform: translateX(0);
  }
}

/* Glass Specular Glare & Refractions */
.orb-glare-top {
  position: absolute;
  top: 14px;
  left: 30px;
  width: 58px;
  height: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.03) 100%);
  border-radius: 50%;
  transform: rotate(-32deg);
  pointer-events: none;
  z-index: 25;
  filter: blur(0.5px);
}

.orb-bottom-refraction {
  position: absolute;
  bottom: 12px;
  right: 30px;
  width: 44px;
  height: 18px;
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.45) 0%, transparent 80%);
  transform: rotate(-25deg);
  pointer-events: none;
  z-index: 25;
}

.orb-inner-rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  pointer-events: none;
  z-index: 24;
}

/* Center Percentage & Status Label */
.orb-center-info {
  position: relative;
  z-index: 30;
  text-align: center;
  pointer-events: none;
}

.progress-bar-percentage,
.orb-num-big {
  position: static !important;
  transform: none !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  color: #ffffff !important;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.98), 0 0 25px rgba(56, 189, 248, 0.6);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 2px;
}

.orb-caption-txt {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(224, 242, 254, 0.95);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
}

/* Rising Micro-Bubbles (Zero concentric rings) */
.orb-micro-bubble,
.progress-bar .bubble {
  position: absolute;
  background: rgba(255, 255, 255, 0.9) !important;
  border-radius: 50% !important;
  bottom: 8px;
  pointer-events: none;
  animation: orbBubbleFloat 2.4s infinite ease-in;
}

@keyframes orbBubbleFloat {
  0% {
    transform: translateY(0) scale(0.4);
    opacity: 0;
  }

  20% {
    opacity: 0.95;
  }

  100% {
    transform: translateY(-185px) scale(1.2);
    opacity: 0;
  }
}

@keyframes flame {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes bubble {
  0% {
    transform: translateY(0px) scale(1);
    opacity: 0.8;
  }

  50% {
    transform: translateY(-15px) scale(1.2);
    opacity: 0.6;
  }

  100% {
    transform: translateY(-30px) scale(1);
    opacity: 0;
  }
}

.navbar a {
  padding: 5px 10px;
  /* Reduce padding to make the buttons smaller */
  font-size: 12px;
  /* Keep the font size unchanged */
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  /* Update border radius to 8px */
  text-decoration: none;
  color: white;
  font-weight: bold;
  transition: all 0.3s ease;
}

.navbar a:hover {
  background-color: rgba(255, 255, 255, 0.144);
  font-size: 14px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
  transform: scale(1.05);
  transition: all 0.3s ease;
}

@media screen and (max-width: 768px) and (orientation: portrait) {
  .navbar {
    flex-wrap: wrap;
    gap: 5px;
  }

  .navbar a {
    font-size: 10px;
    padding: 3px 5px;
  }
}

@media screen and (max-width: 768px) {
  #menu-toggle {
    display: block;
    position: static;
    margin: 0;
    padding: 5px 10px;
    z-index: auto;
    background: transparent;
  }

  #top-panel {
    display: flex;
    height: 25px;
    padding: 5px 10px;
    align-items: center;
    gap: 5px;
    /* Add gap between elements */
  }

  #menu-toggle {
    margin-left: -5px;
    /* Move toggle slightly more left */
    background: transparent;
    padding: 0px;
    font-size: 18px;
  }

  #top-panel h3 {
    font-size: 18px;
    margin-left: 5px;
    /* Reduce margin */
    flex-grow: 1;
    text-align: center;
  }

  #top-panel .navbar {
    display: none !important;
  }

  #left-panel {
    display: block;
    /* Show on small screens */
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    will-change: transform;
    overscroll-behavior: contain;
    z-index: 1000;
    /* Ensure left panel is above logo and toggle */
  }

  #left-panel.active {
    display: block;
    width: 180px;
  }

  #left-panel .navbar a {
    padding: 12px 15px;
    font-size: 14px;
    margin: 4px 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: left;
    display: block;
    width: calc(100% - 10px);
    margin-left: 5px;
    position: relative;
    overflow: hidden;
  }

  #left-panel .navbar a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(5px) scale(1.05);
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  }

  #left-panel .navbar a:active {
    transform: translateX(15px) scale(1.1);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.4);
    transition: all 0.1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }

  body {
    margin-left: 0;
    transition: margin-left 0.3s ease-out;
    overscroll-behavior-x: none;
  }

  body.panel-active {
    margin-left: 200px;
  }

  body {
    padding: 5px;
    margin: 0;
  }

  .navbar a {
    display: none;
    /* Completely hide the buttons */
  }

  .input-section {
    margin-bottom: 5px;
  }

  .row {
    margin-bottom: 3px;
    padding: 1px;
  }

  .cell {
    padding: 3px;
    min-width: 80px;
  }

  .popup-content {
    width: 90%;
    max-width: 300px;
    margin: 10px;
    padding: 15px;
    font-size: 14px;
  }

  .popup-content button {
    padding: 6px 12px;
    font-size: 14px;
    margin-top: 8px;
    width: 80%;
    max-width: 200px;
  }

  #popup {
    padding: 0 10px;
  }

  body {
    margin-left: 0;
  }
}

/* Kuthi Panel Styles */
#kuthi-panel-1 {
  position: relative;
  width: 8.5in;
  height: 14in;
  aspect-ratio: 8.5 / 14;
  max-width: 100%;
  background-color: #ffffff;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  box-sizing: border-box;
  padding: 24px;
  margin: 20px 0;
  font-weight: bold;
  color: #000000;
  font: bold 14px "BengaliMeitei", sans-serif;
}

#kuthi-panel-1 {
  border-image-slice: 130 133 133 136;
  border-image-width: 24px 24px 24px 24px;
  /* Top, Right, Bottom, Left */
  border-image-outset: 0px;
  border-image-repeat: round;
  border-image-source: url('border4 - Copy.jpg');
  border-style: solid;
}


@media (max-width: 480px) {
  #kuthi-panel-1 {
    border-image-slice: 130 133 133 136;
    border-image-width: 10px;
    border-image-outset: 3px;
  }
}

/* Table styling */
#Tripap {
  width: 99%;
  height: 100%;
  border-collapse: collapse;
  text-align: start;
  font-size: 14px;
  padding-bottom: 9%;
}

#Tripap th,
#Tripap td {
  border: 1px solid rgb(0, 0, 0);
  text-align: center;
  padding: 0px;
}

#Tripap th {
  height: 13%;
  background-color: #ffffff;
  font-weight: bold;
}

#Tripap td {
  height: 7%;
}

#Tripap tr:nth-child(1) td,
#Tripap tr:nth-child(5) td,
#Tripap tr:nth-child(6) td,
#Tripap tr:nth-child(10) td {
  border-left: none;
  border-right: none;
  border-top: 1px solid black;
  border-bottom: 1px solid black;
}

#Janma-Table {
  width: 95%;
  height: 40%;
  border-collapse: collapse;
  font-size: 14px;
}

#Janma-Table td {
  height: 8%;
  border: none;
  text-align: center;
  padding: 0px;
}

#Janma-Table tr.tripapbarsh td,
#Janma-Table tr.navatara td {
  height: 12%;
  border-bottom: 1px solid black !important;
  vertical-align: middle;
  padding-top: 0%;
  margin-top: 0%;
}

#Janma-Table tr:nth-child(3) td,
#Janma-Table tr:nth-child(4) td,
#Janma-Table tr:nth-child(5) td,
#Janma-Table tr:nth-child(6) td {
  height: 8%;
  border: 1px solid black;
}

@media (max-width: 450px) {
  #kuthi-panel-1 {
    width: 100% !important;
    height: auto !important;
    min-height: fit-content !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
    padding: 6px 4px 28px 4px !important;
    box-sizing: border-box !important;
  }

  #container-4,
  #container-5 {
    height: auto !important;
    min-height: fit-content !important;
  }

  #Tripap,
  #Janma-Table {
    font-size: 7.5px;
  }
}

/* Top Panel Styles */
#top-panel {
  height: 45px;
  background: linear-gradient(180deg, #b54108, #b95436, #ca1e1e);
  background-size: 200% 200%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  border-radius: 0;
  justify-content: space-between;
  padding: 10px;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

#top-panel h3 {
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
  margin: 0;
  font-size: 22px;
}

@media screen and (max-width: 768px) {
  #top-panel {
    display: flex;
    height: 25px;
    padding: 5px 10px;
    align-items: center;
    gap: 5px;
    /* Add gap between elements */
  }

  #menu-toggle {
    margin-left: -5px;
    /* Move toggle slightly more left */
    background: transparent;
    padding: 5px;
    font-size: 18px;
  }

  #top-panel h3 {
    font-size: 18px;
    margin-left: 5px;
    /* Reduce margin */
    flex-grow: 1;
    text-align: center;
  }

  #top-panel .navbar {
    display: none !important;
  }
}

#responsive-table {
  width: 100%;
  border-collapse: collapse;
}

#responsive-table td {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  text-align: center;
  font-size: 16px;
}

@media (max-width: 600px) {
  #responsive-table td {
    font-size: 14px;
    padding: 10px;
  }
}

@media (max-width: 400px) {
  #responsive-table td {
    font-size: 13px;
    padding: 8px;
  }
}

/* Styling for the 'years-and-dasha' table with only bottom borders */
#years-and-dasha {
  width: 99%;
  height: 100%;
  border-collapse: collapse;
  text-align: start;
  font-size: 14px;
  padding-bottom: 9%;
}


#years-and-dasha th,
#years-and-dasha td {
  border: none;
  /* Remove all borders first */
  border-bottom: 1px solid rgb(107, 105, 105);
  /* Only bottom border */
  text-align: center;
  padding: 0.1vh;
}

#years-and-dasha th {
  height: 13%;
  background-color: #ffffff;
  font-weight: bold;
}

#years-and-dasha td {
  height: 10%;
}

/* Responsive screen adjustment for small devices */
@media (max-width: 450px) {
  #container-3 {
    width: 96vw;
    padding: 0px;

  }

  #years-and-dasha {
    font-size: 7px;

  }
}

#yearlist {
  width: fit-content;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  padding: 5px;
  padding-left: 20px;
  padding-right: 20px;
  font-size: 14px;
  text-align: justify;
  max-width: 100%;
  box-sizing: border-box;
  word-break: break-word;
  line-height: 1.6;
  /* line spacing */

}

/* Optional: simulate line-by-line bottom borders */
#yearlist span {
  display: block;
  border-bottom: 1px solid #cccccc00;
  padding-bottom: 4px;
  margin-bottom: 4px;
}

/* Responsive adjustments */
@media (max-width: 450px) {
  #yearlist {
    font-size: 7px;
    padding: 5px;
    width: 95vw;
    line-height: 1.4;
    padding-top: 2px;
    padding-bottom: 0px;
  }

  #yearlist span {
    padding-bottom: 0px;
    margin-bottom: 1px;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


#container-2 {
  height: 300px;
  /* 1/5th of legal size height at 96dpi */
  width: 100%;
  display: flex;
  flex-direction: column;
  border: 0px solid #ccc;
  border-top: 4px double black;
  font-size: 14px;
  padding-top: 2px;
}


#top-row {
  display: flex;
  flex-direction: row;
  height: 95%;
  width: 100%;
}

#sput-container {
  width: 21%;
}

#Rashi-container {
  width: 46%;
}

#nabangsha-container {
  width: 25%;
}

#janam-container {
  width: 8%;
}

/* Give each block full height to match 92% */
#sput-container,
#Rashi-container,
#nabangsha-container,
#janam-container {
  height: 100%;
  border: 0px solid #ddd;
  overflow: auto;
  padding: 0.1vw;
}

#sput-container {
  font-weight: 700;
  letter-spacing: -0.06vw;
  line-height: 1.6;
  font-size: clamp(0.001rem, 1.5vw + 0.02rem, 13px);
}

/* Small screen adjustment */
@media (max-width: 600px) {
  #sput-container {

    line-height: 1.4;
    padding-left: 1px;
  }
}

#bakari-table {
  width: 100%;
  height: 5%;
  border-collapse: collapse;
  font-size: inherit;
}

#janam-container {
  line-height: 1.4;
  font-size: clamp(0.01rem, 1.2vw + 0.01rem, 0.61rem);
  /*font-weight: bold;*/
}

/* Small screen adjustment */
@media (max-width: 600px) {
  #janam-container {

    line-height: 0.61vh;

  }
}

#bakari-table td {
  border-bottom: 0px solid black;
  text-align: center;
  padding: 0;
  height: 100%;
}

/* Responsive font sizing */
@media (max-width: 600px) {
  #container-2 {
    height: 150px;
    font-size: 7px;
    border-top: double 2px black;
    padding-bottom: 3px;
  }
}

#Rashi-container {
  background-image: url('WhatsApp Image 2025-04-15 at 12.26.33_a34b2bc2.jpg');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;

  display: grid;
  grid-template-columns: 18% 25% 18% 23% 16%;
  grid-template-rows: 18% 23% 18% 23% 18%;
  gap: 0;
  width: 40%;
  /* Rashi */
  max-width: 40%;
  /* Updated max-width */
  height: 100%;
  box-sizing: border-box;

  overflow: hidden;
  padding: 0;
}

#rashi-item-7.diagonal-box {
  position: relative;
  overflow: hidden;
}

/* Shared styles */
.half {
  position: absolute;
  width: 100%;
  height: 100%;
  color: #000;
  display: flex;
}

/* Diagonal clipping */
.left-halfdown7 {
  background: transparent;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.right-halfup7 {
  background: transparent;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

/* Wrapper containers */
.text-wrapper {
  position: absolute;
  width: 40%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Left - bottom aligned */
.left-halfdown7 .text-wrapper {
  left: 0;
  align-items: flex-start;
  justify-content: center;
  text-align: right;

}

/* Right - top aligned */
.right-halfup7 .text-wrapper {
  right: 0;
  align-items: flex-end;
  justify-content: flex-start;
  text-align: right;

}

/* Text styling */
.left-halfdown7 .text {
  margin-top: 90%;
  margin-left: 60%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 80%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 700;
}

.right-halfup7 .text {
  margin-top: 30%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 80%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  margin-right: 15%;
  font-weight: 700;
}





#rashi-item-19.diagonal-box {
  position: relative;
  overflow: hidden;
}

/* Shared styles */
.half {
  position: absolute;
  width: 100%;
  height: 100%;
  color: #000;
  display: flex;
}

/* Diagonal clipping */
.left-halfdown19 {
  background: transparent;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.right-halfup19 {
  /* Updated class name */
  background: transparent;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

/* Wrapper containers */
.right-halfup19 .text-wrapper {
  /* Corrected class selector */
  position: absolute;
  width: 40%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Left - bottom aligned, text align left */
.left-halfdown19 .text-wrapper {
  left: 0;
  align-items: flex-start;
  /* Align wrapper content to the left */
  justify-content: flex-start;
  text-align: left;
}

/* Right - top aligned, text align right but centered inside wrapper */
.right-halfup19 .text-wrapper {
  left: 25%;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: right;
  /* Make text aligned to the right */
}

/* Text styling */
.left-halfdown19 .text {
  margin-top: 70%;
  margin-left: 0%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 75%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 700;
}

.right-halfup19 .text {
  margin-top: 10%;
  margin-right: 0%;
  margin-left: 25%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 80%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 700;
  text-align: right;
  /* Ensures right-aligned text */

}


#rashi-item-17 {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#rashi-item-17 .half {

  position: absolute;
  width: 100%;
  height: 100%;
  color: white;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;

}

.left-halfdown17 {
  background-color: #ffffff00;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  /* Top-left triangle */
}

.right-halfup17 {
  background-color: #ffffff00;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  /* Bottom-right triangle */
}

#rashi-item-17 .text-wrapper {


  color: #000;
  /* Corrected property name from fontcolor to color */
  position: absolute;
  width: 35%;
  height: 100%;
  display: flex;
  flex-direction: column;


  line-height: 0.9;
}

#rashi-item-17 .left-halfdown17 .text-wrapper {
  margin-top: 10%;
  margin-right: 0%;
  margin-left: 27%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 40%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 800;
  left: 0;
  align-items: flex-start;
  text-align: left;
}

#rashi-item-17 .right-halfup17 .text-wrapper {
  margin-top: 60%;
  margin-right: 5%;
  margin-left: 0%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 40%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 800;
  right: 0;
  align-items: flex-end;
  text-align: right;
}

#rashi-item-17 .text {
  word-wrap: break-word;
  max-width: 90%;
  line-height: 0.9;
}






#rashi-item-9 {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;

}

#rashi-item-9 .half {
  position: absolute;
  width: 100%;
  height: 100%;
  color: rgb(0, 0, 0);
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.left-halfdown9 {
  background-color: #3498db00;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  /* Top-left triangle */
}

.right-halfup9 {
  background-color: #e74d3c00;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  /* Bottom-right triangle */
}

#rashi-item-9 .text-wrapper {
  position: absolute;
  width: 40%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;

  line-height: 0.9;
}

#rashi-item-9 .left-halfdown9 .text-wrapper {
  margin-top: 23%;
  margin-right: 0%;
  margin-left: 0%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 40%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 800;
  left: 0;
  align-items: flex-start;
  text-align: left;
}

#rashi-item-9 .right-halfup9 .text-wrapper {
  margin-top: 100%;
  margin-right: 15%;
  margin-left: 0%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 50%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 800;
  right: 0;
  text-align: center;
}

#rashi-item-9 .text {
  word-wrap: break-word;
  max-width: 90%;
  line-height: 0.9;
}

#rashi-item-8,
#rashi-item-12,
#rashi-item-14,
#rashi-item-18 {
  font-weight: 800;
  font-size: 0.65rem;
}


@media only screen and (max-width: 600px) {

  /* === Rashi Item 7 === */
  .left-halfdown7 .text {
    font-size: 0.3rem;
    line-height: 0.9;
    max-width: 95%;
    margin-top: 93%;
    margin-left: 50%;
  }

  .right-halfup7 .text {
    font-size: 0.3rem;
    line-height: 0.9;
    max-width: 80%;
    margin-top: 35%;
    margin-right: 20%;
    margin-left: 0%;
  }

  /* === Rashi Item 9 === */
  #rashi-item-9 .left-halfdown9 .text-wrapper {
    font-size: 0.3rem;
    line-height: 0.8;
    max-width: 50%;
    margin-top: 27%;
    margin-left: 0%;
    margin-right: 5%;
  }

  #rashi-item-9 .right-halfup9 .text-wrapper {
    font-size: 0.3rem;
    line-height: 0.8;
    max-width: 40%;
    margin-top: 97%;
    margin-left: 22%;
    margin-right: 22%;
  }

  /* === Rashi Item 17 === */
  #rashi-item-17 .left-halfdown17 .text-wrapper {
    font-size: 0.3rem;
    line-height: 0.8;
    width: 50%;
    max-width: 60%;
    margin-top: 15%;
    margin-left: 23%;
    margin-right: 0%;


  }

  #rashi-item-17 .right-halfup17 .text-wrapper {
    font-size: 0.3rem;
    line-height: 0.8;
    width: 30%;
    max-width: 30%;
    margin-top: 60%;
    margin-left: 0%;
    margin-right: 7%;
  }

  /* === Rashi Item 19 === */
  .left-halfdown19 .text {
    font-size: 0.3rem;
    line-height: 0.9;
    width: 90%;
    max-width: 100%;
    margin-top: 90%;
    margin-left: 0%;
    margin-right: 0%;
  }

  .right-halfup19 .text {
    font-size: 0.3rem;
    line-height: 0.9;
    width: 100%;
    max-width: 100%;
    margin-top: 15%;
    margin-left: 15%;
    margin-right: 0%;
  }

}

@media (max-width: 600px) {
  #rashi-item-13 {
    font-size: 6px !important;
    line-height: 1 !important;
    padding: 0 !important;
    word-break: break-word;
    max-width: 95%;
    text-align: center;
  }
}

@media (max-width: 600px) {

  #rashi-item-8,
  #rashi-item-12,
  #rashi-item-14,
  #rashi-item-18 {
    font-weight: 800 !important;
    font-size: 0.3rem !important;
    text-align: center;
  }
}

#nabangsha-container {
  background-image: url('a1Astrology Layout_page-0001(2).jpg');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  padding-top: 2%;

  display: grid;
  grid-template-columns: 7% 34% 18% 34% 7%;
  grid-template-rows: 12% 29% 18% 29% 12%;
  gap: 0;
  width: 25%;
  /* Rashi */
  max-width: 25%;
  height: 100%;
  box-sizing: border-box;
  border: 0px solid #ddd;
  overflow: hidden;
  padding: 0;
}




/* Nabangsha Item 7 */
#nabangsha-item-7.diagonal-box {
  position: relative;
  overflow: hidden;
}

/* Shared styles */
#nabangsha-item-7 .half {
  position: absolute;
  width: 100%;
  height: 100%;
  color: #000;
  display: flex;
}

/* Diagonal clipping */
#nabangsha-item-7 .left-halfdown-n7 {
  background: transparent;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

#nabangsha-item-7 .right-halfup-n7 {
  background: transparent;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

/* Wrapper containers */
#nabangsha-item-7 .text-wrapper {
  position: absolute;
  width: 40%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Left - bottom aligned */
#nabangsha-item-7 .left-halfdown-n7 .text-wrapper {
  left: 0;
  align-items: flex-start;
  justify-content: center;
  text-align: right;
}

/* Right - top aligned */
#nabangsha-item-7 .right-halfup-n7 .text-wrapper {
  right: 0;
  align-items: flex-end;
  justify-content: flex-start;
  text-align: right;
}

/* Text styling */
#nabangsha-item-7 .left-halfdown-n7 .text {
  margin-top: 90%;
  margin-left: 60%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 80%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 800;
}

#nabangsha-item-7 .right-halfup-n7 .text {
  margin-top: 30%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 80%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  margin-right: 15%;
  font-weight: 800;
}

/* Nabangsha Item 9 */
#nabangsha-item-9 {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#nabangsha-item-9 .half {
  position: absolute;
  width: 100%;
  height: 100%;
  color: rgb(0, 0, 0);
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#nabangsha-item-9 .left-halfup-n9 {
  background-color: #3498db00;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

#nabangsha-item-9 .right-halfdown-n9 {
  background-color: #e74d3c00;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

#nabangsha-item-9 .text-wrapper {
  position: absolute;
  width: 40%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  line-height: 0.9;
}

#nabangsha-item-9 .left-halfup-n9 .text-wrapper {
  margin-top: 23%;
  margin-right: 0%;
  margin-left: 10%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 40%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 800;
  left: 0;
  align-items: flex-start;
  text-align: left;
}

#nabangsha-item-9 .right-halfdown-n9 .text-wrapper {
  margin-top: 90%;
  margin-right: 10%;
  margin-left: 0%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 35%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 800;
  right: 0;
  text-align: center;
}

#nabangsha-item-9 .text {
  word-wrap: break-word;
  max-width: 90%;
  line-height: 0.9;
}

/* Nabangsha Item 17 */
#nabangsha-item-17 {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;

}

#nabangsha-item-17 .half {
  position: absolute;
  width: 100%;
  height: 100%;
  color: white;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#nabangsha-item-17 .left-halfup-n17 {

  clip-path: polygon(0 0, 100% 0, 0 100%);
}

#nabangsha-item-17 .right-halfdown-n17 {

  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

#nabangsha-item-17 .text-wrapper {
  color: #000;
  position: absolute;
  width: 35%;
  height: 100%;
  display: flex;
  flex-direction: column;
  line-height: 0.9;
}

#nabangsha-item-17 .left-halfup-n17 .text-wrapper {
  margin-top: 10%;
  margin-right: 0%;
  margin-left: 27%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 40%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 800;
  left: 0;
  align-items: flex-start;
  text-align: left;
}

#nabangsha-item-17 .right-halfdown-n17 .text-wrapper {
  margin-top: 60%;
  margin-right: 5%;
  margin-left: 0%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 40%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 800;
  right: 0;
  align-items: flex-end;
  text-align: right;
}

#nabangsha-item-17 .text {
  word-wrap: break-word;
  max-width: 90%;
  line-height: 0.9;
}

/* Nabangsha Item 19 */
#nabangsha-item-19.diagonal-box {
  position: relative;
  overflow: hidden;
}

/* Shared styles */
#nabangsha-item-19 .half {
  position: absolute;
  width: 100%;
  height: 100%;
  color: #000;
  display: flex;
}

/* Diagonal clipping */
#nabangsha-item-19 .left-halfdown-n19 {
  background: transparent;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

#nabangsha-item-19 .right-halfup-n19 {
  background: transparent;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

/* Wrapper containers */
#nabangsha-item-19 .right-halfup-n19 .text-wrapper {
  position: absolute;
  width: 40%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Left - bottom aligned, text align left */
#nabangsha-item-19 .left-halfdown-n19 .text-wrapper {
  left: 0;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
}

/* Right - top aligned, text align right but centered inside wrapper */
#nabangsha-item-19 .right-halfup-n19 .text-wrapper {
  left: 25%;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: right;
}

/* Text styling */
#nabangsha-item-19 .left-halfdown-n19 .text {
  margin-top: 75%;
  margin-left: 20%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 75%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 800;
}

#nabangsha-item-19 .right-halfup-n19 .text {
  margin-top: 10%;
  margin-right: 0%;
  margin-left: 35%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 100%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 800;
  text-align: right;
}

#nabangsha-item-8,
#nabangsha-item-12,
#nabangsha-item-14,
#nabangsha-item-18 {
  font-weight: 800;
  font-size: 0.65rem;
  text-align: center;
}


/* Mobile Responsive Styles */
@media only screen and (max-width: 600px) {

  /* Nabangsha Item 7 */
  #nabangsha-item-7 .left-halfdown-n7 .text {
    font-size: 0.3rem;
    line-height: 0.9;
    max-width: 95%;
    margin-top: 93%;
    margin-left: 50%;
  }

  #nabangsha-item-7 .right-halfup-n7 .text {
    font-size: 0.3rem;
    line-height: 0.9;
    max-width: 80%;
    margin-top: 35%;
    margin-right: 20%;
    margin-left: 0%;
  }

  /* Nabangsha Item 9 */
  #nabangsha-item-9 .left-halfup-n9 .text-wrapper {
    font-size: 0.3rem;
    line-height: 0.8;
    max-width: 50%;
    margin-top: 27%;
    margin-left: 10%;
    margin-right: 0%;
  }

  #nabangsha-item-9 .right-halfdown-n9 .text-wrapper {
    font-size: 0.3rem;
    line-height: 1;
    max-width: 40%;
    margin-top: 97%;
    margin-left: 35%;
    margin-right: 5%;
  }

  /* Nabangsha Item 17 */
  #nabangsha-item-17 .left-halfup-n17 .text-wrapper {
    font-size: 0.3rem;
    line-height: 0.8;
    width: 50%;
    max-width: 60%;
    margin-top: 15%;
    margin-left: 23%;
    margin-right: 0%;
  }

  #nabangsha-item-17 .right-halfdown-n17 .text-wrapper {
    font-size: 0.3rem;
    line-height: 0.8;
    width: 30%;
    max-width: 30%;
    margin-top: 60%;
    margin-left: 0%;
    margin-right: 7%;
  }

  /* Nabangsha Item 19 */
  #nabangsha-item-19 .left-halfdown-n19 .text {
    font-size: 0.3rem;
    line-height: 1;
    width: 90%;
    max-width: 100%;
    margin-top: 90%;
    margin-left: 10%;
    margin-right: 0%;
  }

  #nabangsha-item-19 .right-halfup-n19 .text {
    font-size: 0.3rem;
    line-height: 1.1;
    width: 100%;
    max-width: 100%;
    margin-top: 15%;
    margin-left: 15%;
    margin-right: 0%;
  }
}

@media (max-width: 600px) {

  #nabangsha-item-8,
  #nabangsha-item-12,
  #nabangsha-item-14,
  #nabangsha-item-18 {
    font-weight: 800 !important;
    font-size: 0.3rem !important;
    text-align: center;
  }
}







#nabangsha-container {
  width: 32%;
  /* Nabangsha */
  max-width: 32%;
}

/* Individual grid items (optional styling) */
#Rashi-container>div {
  border: 0px solid #aaa;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

#nabangsha-container>div {
  border: 0px solid #aaa;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

/* Estimated 1/10 of legal height (~1120px) = ~112px */
#sub-container-2 {
  height: 112px;
  width: 100%;

  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Flex row holding the left and right columns */
#sub-container-2 .row {
  display: flex;
  flex: 1;
  width: 100%;
}

#inner-sub-a,
#inner-sub-b {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  font-size: 0.9rem;
}

/*   #inner-sub-a {
    border-right: 1px solid #ccc;
  }
 */
/* Table at bottom */
#sub-container-2 table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #000;
  font-size: 0.9rem;
}

#sub-container-2 td {
  text-align: center;
  padding: 0px;
}

/* Responsive design for small screens */
@media (max-width: 600px) {
  #sub-container-2 {
    height: 100px;
    /* Slightly smaller for smaller screens */
  }

  #inner-sub-a,
  #inner-sub-b {
    font-size: 0.4rem;
  }

  #sub-container-2 table {
    font-size: 0.4rem;
  }
}


/* Simulate legal paper height with proportional aspect ratio */
#container-1 {
  width: 100%;
  aspect-ratio: 8.5 / 3.1;
  height: auto;
  min-height: 270px;
  max-height: 295px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.top-div {
  height: 20%;
  width: 100%;
  background-color: #ffffff00;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  display: flex;
  flex-direction: column;

}

#Headingkuthi {
  width: 100%;
  height: 44%;
  font-size: 1.5rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  /* Optional for emphasis */
}

#Headingkuthi2 {
  width: 100%;
  height: 56%;
  font-size: 16px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  /* Optional for emphasis */
}

/* 📱 Responsive for small screens */
@media (max-width: 450px) {
  #Headingkuthi {
    font-size: 12px;
  }
}

@media (max-width: 450px) {
  #Headingkuthi2 {
    font-size: 6px;

  }
}




.bottom-divs {
  height: 80%;
  width: 100%;
  display: flex;
  flex-direction: row;
  /* Always row */
  flex-wrap: nowrap;
}

.bottom-divs>div {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.left {
  width: 20%;
  background-color: #ffffff00;
}

.middle {
  width: 60%;
  background-color: #ffe0b200;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  height: 100%;
}

.middle-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 0.9rem;
}

.box-1 {
  width: 33%;
  background-image: url('Janma.jpg');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.box-2 {
  background-image: url('2cross.jpg');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  width: 34%;
  background-color: rgba(221, 255, 221, 0);
  display: flex;
  flex-direction: column;
}

.box-3 {
  width: 33%;
  background-image: url('Janma.jpg');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#jatahagrid {
  width: 100%;
  height: 90%;
  background-color: #f0f0f000;
  display: grid;
  grid-template-columns: 21% 20% 21% 19% 19%;
  grid-template-rows: 36% 7.8% 7.8% 7.8% 7.8% 7.8% 7.8% 7.8% 7.4%;
  gap: 0;
}

/* Default style for all grid items */
#jatahagrid>div {
  font-size: 0.8rem;
  line-height: 1.15;
  display: flex;
  align-items: center;
  /* Vertically centers text */
  box-sizing: border-box;
  overflow: hidden;
  padding: 0 2px;
}

/* Column 1 (Left-Aligned) */
#jatahagrid>div:nth-child(5n+1) {
  /* Targets 1st, 6th, 11th, ... items (Column 1) */
  justify-content: flex-start;
  /* Left-align */
  text-align: left;
  margin-left: 2px;
}

/* Columns 2, 3, 4 (Centered) */
#jatahagrid>div:nth-child(5n+2),
#jatahagrid>div:nth-child(5n+3),
#jatahagrid>div:nth-child(5n+4) {
  justify-content: center;
  /* Center-align */
  text-align: center;
}

/* Column 5 (Right-Aligned) */
#jatahagrid>div:nth-child(5n+5) {
  /* Targets 5th, 10th, 15th, ... items (Column 5) */
  justify-content: flex-end;
  /* Right-align */
  text-align: right;
  margin-right: 2px;
}

/* Responsive adjustments for tablet & small screens */
@media (max-width: 768px) {
  #jatahagrid>div {
    font-size: clamp(7px, 1.3vw, 0.65rem);
    line-height: 1.05;
    padding: 0 1px;
  }

  .bottom-label-jataha {
    margin-top: auto;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  #jatahagrid>div {
    font-size: clamp(5.8px, 1.5vw, 0.52rem);
    line-height: 1;
    padding: 0 1px;
  }

  #jatahagrid>div:nth-child(5n+1) {
    margin-left: 1px;
  }

  #jatahagrid>div:nth-child(5n+5) {
    margin-right: 1px;
  }

  .bottom-label-jataha {
    font-size: clamp(6.8px, 1.8vw, 0.7rem);
    margin-top: auto;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  #jatahagrid>div {
    font-size: clamp(4.8px, 1.7vw, 0.45rem);
    line-height: 0.95;
    padding: 0;
  }

  .bottom-label-jataha {
    font-size: clamp(5.5px, 2vw, 0.6rem);
    margin-top: auto;
    transform: translateY(0);
  }
}

@media (max-width: 380px) {
  #jatahagrid>div {
    font-size: clamp(4.2px, 1.8vw, 0.4rem);
    line-height: 0.9;
  }

  .bottom-label-jataha {
    font-size: clamp(5px, 2vw, 0.55rem);
    margin-top: auto;
    transform: translateY(0);
  }
}

.bottom-label-jataha {
  width: 100%;
  height: 10%;
  background-color: #cccccc00;
  /* optional */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: auto;
  transform: translateY(0);
}

#crossgrid {
  width: 100%;
  height: 100%;
  background-color: #f0f0f000;
  display: grid;
  grid-template-columns: 16% 5% 58% 3% 18%;
  grid-template-rows: 42% 8% 8% 8% 10.5% 10% 7.5% 4.5%;
  gap: 0;
  margin-left: 0px;
}

/* Default style for all grid items */
#crossgrid>div {
  font-size: clamp(6.5px, 1.4vw, 9.5px);
  line-height: 1;
  display: flex;
  align-items: center;
  /* Vertically centers text */
  box-sizing: border-box;
  overflow: hidden;
  padding: 0px;
}

/* Column 1 (Left-Aligned) */
#crossgrid>div:nth-child(5n+1) {
  text-align: left;
  /* Left-align */
  justify-content: flex-start;
  margin-left: 2px;
}

/* Columns 2, 3, 4 (Centered) */
#crossgrid>div:nth-child(5n+2),
#crossgrid>div:nth-child(5n+3),
#crossgrid>div:nth-child(5n+4) {
  justify-content: center;
  /* Center-align */
  text-align: center;
}

/* Column 5 (Right-Aligned) */
#crossgrid>div:nth-child(5n+5) {
  justify-content: flex-end;
  /* Right-align */
  text-align: right;
  margin-right: 2px;
}

/* Responsive adjustments for tablet & small screens */
@media (max-width: 768px) {
  #crossgrid>div {
    font-size: clamp(6.5px, 1.4vw, 9.5px);
    padding: 0px;
  }

  #crossgrid>div:nth-child(5n+1) {
    margin-left: 0px;
  }

  #crossgrid>div:nth-child(5n+5) {
    margin-left: 0px;
  }

  #crossgrid>div:nth-child(5n+3) {
    font-size: clamp(9px, 2.6vw, 15px);
  }
}

@media (max-width: 600px) {
  #crossgrid>div {
    font-size: clamp(5.8px, 1.6vw, 8.5px);
    padding: 3px;
  }

  #crossgrid>div:nth-child(5n+3) {
    font-size: clamp(8px, 2.8vw, 12.5px);
  }
}


#parahagrid {
  width: 100%;
  height: 90%;
  background-color: #f0f0f000;
  display: grid;
  grid-template-columns: 21% 20% 21% 19% 19%;
  grid-template-rows: 36% 7.8% 7.8% 7.8% 7.8% 7.8% 7.8% 7.8% 7.4%;
  gap: 0;
}

/* Default style for all grid items */
#parahagrid>div {
  font-size: 0.8rem;
  line-height: 1.15;
  display: flex;
  align-items: center;
  /* Vertically centers text */
  box-sizing: border-box;
  overflow: hidden;
  padding: 0 2px;
}

/* Column 1 (Left-Aligned) */
#parahagrid>div:nth-child(5n+1) {
  justify-content: flex-start;
  /* Left-align */
  text-align: left;
  margin-left: 2px;
}

/* Columns 2, 3, 4 (Centered) */
#parahagrid>div:nth-child(5n+2),
#parahagrid>div:nth-child(5n+3),
#parahagrid>div:nth-child(5n+4) {
  justify-content: center;
  /* Center-align */
  text-align: center;
}

/* Column 5 (Right-Aligned) */
#parahagrid>div:nth-child(5n+5) {
  justify-content: flex-end;
  /* Right-align */
  text-align: right;
  margin-right: 2px;
}

/* Responsive adjustments for tablet & small screens */
@media (max-width: 768px) {
  #parahagrid>div {
    font-size: clamp(7px, 1.3vw, 0.65rem);
    line-height: 1.05;
    padding: 0 1px;
  }

  .bottom-label-paraha {
    margin-top: auto;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  #parahagrid>div {
    font-size: clamp(5.8px, 1.5vw, 0.52rem);
    line-height: 1;
    padding: 0 1px;
  }

  #parahagrid>div:nth-child(5n+1) {
    margin-left: 1px;
  }

  #parahagrid>div:nth-child(5n+5) {
    margin-right: 1px;
  }

  .bottom-label-paraha {
    font-size: clamp(6.8px, 1.8vw, 0.7rem);
    margin-top: auto;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  #parahagrid>div {
    font-size: clamp(4.8px, 1.7vw, 0.45rem);
    line-height: 0.95;
    padding: 0;
  }

  .bottom-label-paraha {
    font-size: clamp(5.5px, 2vw, 0.6rem);
    margin-top: auto;
    transform: translateY(0);
  }
}

@media (max-width: 380px) {
  #parahagrid>div {
    font-size: clamp(4.2px, 1.8vw, 0.4rem);
    line-height: 0.9;
  }

  .bottom-label-paraha {
    font-size: clamp(5px, 2vw, 0.55rem);
    margin-top: auto;
    transform: translateY(0);
  }
}

.bottom-label-paraha {
  width: 100%;
  height: 10%;
  background-color: #cccccc00;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: auto;
  transform: translateY(0);
}


/* Small screen styles */
@media (max-width: 600px) {
  .middle-box {
    font-size: 0.4rem;
  }
}




.right {
  width: 20%;
  background-color: #ffffff00;
}

/* Responsive: shrink font and allow scroll if necessary */
@media (max-width: 600px) {
  .bottom-divs>div {
    font-size: 0.7rem;
  }

  .bottom-divs {
    overflow-x: auto;
    /* In case it's too tight, allow horizontal scroll */
  }
}




#sub-container-2 {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 120px;
  box-sizing: border-box;
}

#inner-sub-a {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: start;
  font-size: 0.7rem;
  padding-top: 3px;
}

#inner-sub-b {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: start;
  font-size: 0.7rem;
  padding-top: 3px;
}


/* Responsive: smaller font and height for small screens */
@media (max-width: 600px) {
  #sub-container-2 {
    height: 62px;
  }

  #inner-sub-a,
  #inner-sub-b {
    font-size: 0.4rem;
  }
}

/* Registration Info Box & Scannable QR Badge Styles */
#left-div-reginfo {
  margin: 2px auto;
  color: #1e293b;
  background: #ffffff;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 95%;
  max-width: 140px;
  box-sizing: border-box;
}

#left-div-reginfo .kuthi-qr-code-box {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3px;
  background: #ffffff;
  padding: 2px;
  border-radius: 4px;
  width: 100%;
}

#left-div-reginfo .kuthi-qr-code-box img,
#left-div-reginfo .kuthi-qr-code-box canvas {
  display: block;
  width: auto;
  height: auto;
  max-width: 68px;
  max-height: 68px;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

#left-div-reginfo .kuthi-qr-text-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  width: 100%;
}

#left-div-reginfo .kuthi-qr-line {
  font-size: 0.68rem;
  line-height: 1.2;
  color: #334155;
  display: flex;
  gap: 2px;
  justify-content: center;
  flex-wrap: wrap;
  word-break: break-word;
}

#left-div-reginfo .kuthi-qr-lbl {
  font-weight: 700;
  color: #0f172a;
}

#left-div-reginfo .kuthi-qr-val {
  font-weight: 600;
  color: #1e40af;
}

#left-div-reginfo .kuthi-qr-domain {
  font-size: 0.70rem;
  font-weight: 800;
  color: #1d4ed8;
  letter-spacing: 0.2px;
  margin-top: 1px;
  text-transform: lowercase;
}

/* Tablet screens */
@media (max-width: 768px) {
  #left-div-reginfo {
    padding: 3px 4px;
    max-width: 110px;
  }

  #left-div-reginfo .kuthi-qr-code-box img,
  #left-div-reginfo .kuthi-qr-code-box canvas {
    max-width: 52px;
    max-height: 52px;
  }

  #left-div-reginfo .kuthi-qr-line {
    font-size: 0.52rem;
  }

  #left-div-reginfo .kuthi-qr-domain {
    font-size: 0.56rem;
  }
}

/* Mobile screens */
@media (max-width: 600px) {
  #left-div-reginfo {
    padding: 2px 3px;
    max-width: 85px;
    border-radius: 4px;
  }

  #left-div-reginfo .kuthi-qr-code-box {
    margin-bottom: 1px;
    padding: 1px;
  }

  #left-div-reginfo .kuthi-qr-code-box img,
  #left-div-reginfo .kuthi-qr-code-box canvas {
    max-width: 40px;
    max-height: 40px;
  }

  #left-div-reginfo .kuthi-qr-line {
    font-size: 0.40rem;
    line-height: 1.1;
  }

  #left-div-reginfo .kuthi-qr-domain {
    font-size: 0.44rem;
  }
}

/* Extra small mobile screens */
@media (max-width: 420px) {
  #left-div-reginfo {
    padding: 1px 2px;
    max-width: 70px;
  }

  #left-div-reginfo .kuthi-qr-code-box img,
  #left-div-reginfo .kuthi-qr-code-box canvas {
    max-width: 34px;
    max-height: 34px;
  }

  #left-div-reginfo .kuthi-qr-line {
    font-size: 0.35rem;
  }

  #left-div-reginfo .kuthi-qr-domain {
    font-size: 0.38rem;
  }
}

#userinfo-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 0.7rem;
  color: #333;
  min-width: 160px;
  padding-left: 36px;
  font-family: Arial, Helvetica, sans-serif;
}

/* Small screen adjustment for userinfo-summary */
@media (max-width: 600px) {
  #userinfo-summary {
    font-size: 0.36rem;
    min-width: 80px;
    padding-left: 12px;
  }
}

/* Flex row for kuthi panels */
#kuthi-flex-panels {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  width: 100%;
}

/* Left panel */
#kuthi-panel-1 {
  /* ...existing code... */
  /* Already has display: flex and column direction */
  /* Ensure it stays left */
  margin-right: 0;
}

/* Right panel */
#kuthi-panel-1 {
  /* ...existing code... */
  /* Already has display: flex and column direction */
  /* Ensure it stays left */
  margin-right: 0;
}

/* Right panel */
#kuthi-panel-2 {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: flex-start;
  background: #ffffff;
  padding: 0px 0;
  width: 10in;
  height: 13.6in;
  max-width: 100%;
  max-height: 100%;
  box-shadow: 20px 20px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive: stack panels & ensure dynamic panel-1 expansion for all screens <= 900px (e.g. 800x1280, 768px, 744px) */
@media (max-width: 900px) {
  body {
    padding: 6px;
    overflow-x: hidden;
  }

  .container {
    margin: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  #kuthi-flex-panels {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 100%;
  }

  #kuthi-panel-1 {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: fit-content !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
    padding: 12px 10px 36px 10px !important;
    margin: 10px auto !important;
    border-image-width: 12px;
    box-sizing: border-box !important;
  }

  #container-1 {
    aspect-ratio: 8.5 / 2.7 !important;
    height: auto !important;
    min-height: 180px !important;
    max-height: none !important;
    width: 100% !important;
  }

  .bottom-divs {
    height: 78% !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
  }

  .middle {
    width: 60% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
  }

  .box-1,
  .box-3 {
    width: 33% !important;
    height: 100% !important;
  }

  .box-2 {
    width: 34% !important;
    height: 100% !important;
  }

  #container-4,
  #container-5 {
    height: auto !important;
    min-height: fit-content !important;
  }

  #kuthi-panel-2 {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: auto;
    aspect-ratio: auto;
    box-sizing: border-box;
    padding: 6px 4px;
  }

  #Tripap {
    font-size: 11px;
    width: 100%;
  }

  #Tripap th,
  #Tripap td {
    padding: 2px;
  }

  .fetch-section,
  #manualybirthinput {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 10px !important;
    margin: 12px auto !important;
    box-sizing: border-box !important;
  }

  .fetch-section input[type="text"],
  .fetch-section input[type="date"],
  #manualybirthinput input,
  #manualybirthinput select {
    max-width: 100%;
    box-sizing: border-box;
  }

  #hourSelect,
  #minuteSelect,
  #secondSelect,
  #periodSelect {
    padding: 6px 4px;
    font-size: 13px;
    margin: 2px;
  }

  #checkBtn,
  #calculatemanualbirthBtn {
    width: 100%;
    margin-left: 0 !important;
    margin-top: 10px !important;
    padding: 10px 16px !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 480px) {
  #kuthi-panel-1 {
    width: 100% !important;
    height: auto !important;
    min-height: fit-content !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
    padding: 8px 6px 28px 6px !important;
    border-image-width: 8px;
    border-image-outset: 0;
    box-sizing: border-box !important;
  }

  #container-1 {
    aspect-ratio: 8.5 / 2.8 !important;
    min-height: 145px !important;
    height: auto !important;
  }

  #container-4,
  #container-5 {
    height: auto !important;
    min-height: fit-content !important;
  }

  #Tripap {
    font-size: 9.5px;
  }

  #Tripap th,
  #Tripap td {
    padding: 1px;
  }

  #Janma-Table {
    font-size: 9.5px;
  }

  .modern-popup-card {
    width: 95vw !important;
    margin: 10px auto !important;
  }
}



.scrollable-div {
  max-height: 300px;
  /* or any height you want */
  overflow-y: auto;
  overflow-anchor: none;
}

















#details-popup {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(30, 40, 60, 0.25);
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.modern-popup-card {
  background: #fff;
  border-radius: 18px;
  max-width: 420px;
  width: 92vw;
  margin: auto;
  padding: 0 0 28px 0;
  box-shadow: 0 8px 32px rgba(40, 60, 120, 0.18), 0 1.5px 8px rgba(79, 140, 255, 0.10);
  text-align: left;
  position: relative;
  animation: popupIn 0.32s cubic-bezier(.4, 1.6, .6, 1) both;
  overflow: hidden;
}

@keyframes popupIn {
  0% {
    transform: translateY(40px) scale(0.95);
    opacity: 0;
  }

  100% {
    transform: translateY(0px) scale(1);
    opacity: 1;
  }
}

.modern-popup-header {
  background: linear-gradient(90deg, #4f8cff 0%, #38d39f 100%);
  color: #fff;
  padding: 24px 32px 16px 32px;
  border-radius: 18px 18px 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modern-popup-icon {
  font-size: 2rem;
  margin-right: 6px;
}

.modern-popup-header h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.modern-popup-content {
  font-size: 1.08rem;
  color: #222;
  padding: 22px 32px 0 32px;
  line-height: 1.7;
  word-break: break-word;
}

.modern-popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  padding: 24px 32px 0 32px;
}

.modern-btn {
  border: none;
  border-radius: 7px;
  padding: 10px 26px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, color 0.18s;
  box-shadow: 0 2px 8px rgba(79, 140, 255, 0.09);
  outline: none;
}

.modern-btn-ok {
  background: linear-gradient(90deg, #4f8cff 0%, #38d39f 100%);
  color: #fff;
}

.modern-btn-ok:hover {
  background: linear-gradient(90deg, #38d39f 0%, #4f8cff 100%);
  box-shadow: 0 4px 16px rgba(56, 211, 159, 0.13);
}

.modern-btn-cancel {
  background: #fff;
  color: #f44336;
  border: 1.5px solid #f44336;
}

.modern-btn-cancel:hover {
  background: #f44336;
  color: #fff;
}

@media (max-width: 600px) {

  .modern-popup-card,
  .modern-popup-header,
  .modern-popup-content,
  .modern-popup-actions {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .modern-popup-card {
    max-width: 98vw;
  }
}

@media print {
  @page {
    size: 8.5in 14in;
    margin: 0;
  }

  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  body * {
    visibility: hidden;
  }

  #kuthi-panel-1,
  #kuthi-panel-1 * {
    visibility: visible;
  }

  #kuthi-panel-1 {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 8.5in !important;
    min-width: 8.5in !important;
    max-width: 8.5in !important;
    height: calc(14in - 0.4in) !important;
    min-height: calc(14in - 0.4in) !important;
    max-height: calc(14in - 0.4in) !important;
    aspect-ratio: 8.5 / 13.6 !important;
    margin: 0 !important;
    padding: 24px !important;
    border-image-source: url('border4 - Copy.jpg') !important;
    border-image-slice: 130 133 133 136 !important;
    border-image-width: 24px !important;
    border-image-repeat: round !important;
    border-style: solid !important;
    box-sizing: border-box !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    overflow: hidden !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  #main-container {
    height: 100% !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  #left-div-reginfo {
    max-width: 155px !important;
    padding: 6px 8px !important;
    margin: 4px auto !important;
  }

  #left-div-reginfo .kuthi-qr-code-box img,
  #left-div-reginfo .kuthi-qr-code-box canvas {
    max-width: 88px !important;
    max-height: 88px !important;
    width: 88px !important;
    height: 88px !important;
  }

  #left-div-reginfo .kuthi-qr-line {
    font-size: 0.74rem !important;
    line-height: 1.25 !important;
  }

  #left-div-reginfo .kuthi-qr-domain {
    font-size: 0.78rem !important;
  }
}